package com.Ngbussiness.dao.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.Ngbussiness.dao.new_informationDao;
import com.Ngbussiness.util.Calenda;
import com.Ngbussiness.util.DatabaseAccess;
import com.Ngbussiness.util.EasyMapsManager;



public class new_informationDaoImpl implements new_informationDao{
	public boolean savenew_information(String content, int member_id,String img_url,int category_id,int type){
		DatabaseAccess dao=new DatabaseAccess();
		Calenda C=new Calenda();
		String now=C.getNowTime().toString();
		String sql="insert into new_information(content,uptime,member_id,type,zan_count," +
				"resend_count,comment_count,see_count,is_delete,category_id,img_url) values(?,?,?,?,?,?,?,?,?,?,?);";
		dao.setPreparedParameter(content);
		dao.setPreparedParameter(now);
		dao.setPreparedParameter(member_id);
		dao.setPreparedParameter(type);
		dao.setPreparedParameter(0);
		dao.setPreparedParameter(0);
		dao.setPreparedParameter(0);
		dao.setPreparedParameter(0);
		dao.setPreparedParameter(0);
		dao.setPreparedParameter(category_id);
		dao.setPreparedParameter(img_url);
		boolean b=dao.executeInsert(sql)>0?true:false;
		return b;
	}
}
